import { createApp } from 'vue'
import { createPinia } from 'pinia'
/* import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css' */
import App from './App.vue'
import router from './router'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'


import 'virtual:windi.css'
import '@/styles/common.scss'

 // 全局指令注册  懒加载指令插件并且注册
import { lazyPlugin } from '@/directives'
// 引入全局组件插件
import { componentPlugin } from '@/components'

const app = createApp(App)
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)
app.use(pinia)

app.use(router)
//app.use(ElementPlus)
app.use(lazyPlugin)
app.use(componentPlugin)

import './permission.js'

app.mount('#app')
